December 4, 2026
Three Vulnerabilities I Found While Auditing OpenJPEG’s OpenJPIP Implementation
By Harsh Raj Singhania Second-year B.Tech Cybersecurity student | Independent Security Researcher | 30+ CVE credits

By Harsh Raj Singhania
13 min read
Introduction: Sometimes, the smallest mistakes are the most interesting
When I sit down to audit a codebase, I usually don't begin by looking for a particular vulnerability type. I prefer to understand how the application works first, follow the important execution paths, and then start questioning the assumptions the code makes.
During one of my source-code audits, I turned my attention to OpenJPEG, specifically its OpenJPIP implementation.
OpenJPEG is a JPEG 2000 library written in C. Its OpenJPIP components provide functionality for exchanging and serving JPEG 2000 image data over a network. That made the networking code an interesting place to investigate.
I spent time following how data travels through its socket-handling functions, how the server receives information from clients, and how responses are divided into frames before transmission.
What caught my attention were not particularly complicated algorithms. They were small assumptions made by the code.
A socket read was assumed to eventually return the requested data. A pointer returned by a helper function was treated as valid without checking. And a streaming loop calculated the actual size of a data chunk correctly, only to use a different value when updating its pointer.
Those details led me to three separate security findings:
- An infinite loop when a TCP peer closes a connection before sending all expected data.
- A NULL pointer dereference in the auxiliary TCP acknowledgement handler.
- A heap-based out-of-bounds read caused by incorrect length accounting in the auxiliary streaming function.
I reported all three findings to VulnCheck for coordinated vulnerability disclosure. Their review confirmed that the submissions identify CVE-eligible issues or valid security primitives eligible for CVE assignment.
This article is my attempt to document the research, explain the mistakes in simple language, and show how I believe they should be addressed.
Audit baseline: 8314119b067c0fc77834731168daaebd379fdb12
Affected project: OpenJPEG — OpenJPIP components
Scope: The findings discussed here concern the network-facing OpenJPIP implementation. They should not be interpreted as vulnerabilities in every application that uses OpenJPEG to decode a local JPEG 2000 image.
1. When a closed connection never really closes: Infinite loop in receive_stream()
Affected file: src/lib/openjpip/sock_manager.c
Affected function: receive_stream()
Vulnerability type: Improper handling of TCP connection closure leading to denial of service.
Following the data
The first issue appeared while I was examining how OpenJPIP receives data over TCP.
The function responsible for this is receive_stream(). Its purpose is simple: receive a specific number of bytes from a connected socket and return the resulting data.
To accomplish this, it maintains a variable called remlen, which tracks how many bytes are still expected.
The function repeatedly calls recv() until the requested amount of data has been received.
At first glance, the logic seems reasonable. It checks for a socket error, updates the remaining length, and advances the destination pointer.
But there was one condition missing.
The assumption that caused the problem
The code checks whether recv() returns -1, but it does not properly handle a return value of 0.
This is an important distinction in TCP programming:
- A positive return value means data was received.
- A return value of
-1indicates a socket error. - A return value of
0means the peer has closed its sending side of the connection.
In other words, receiving zero bytes is not the same as successfully receiving the requested data.
Here is the relevant vulnerable logic:
Vulnerable code
void * receive_stream(SOCKET connected_socket, OPJ_SIZE_T length)
{
char *stream, *ptr;
OPJ_SIZE_T remlen;
ptr = stream = malloc(length);
remlen = length;
while (remlen > 0) {
ssize_t redlen = recv(connected_socket, ptr, remlen, 0);
if (redlen == -1) {
fprintf(FCGI_stderr, "receive stream error\n");
free(stream);
stream = NULL;
break;
}
remlen -= (OPJ_SIZE_T)redlen;
ptr = ptr + redlen;
}
return stream;
}void * receive_stream(SOCKET connected_socket, OPJ_SIZE_T length)
{
char *stream, *ptr;
OPJ_SIZE_T remlen;
ptr = stream = malloc(length);
remlen = length;
while (remlen > 0) {
ssize_t redlen = recv(connected_socket, ptr, remlen, 0);
if (redlen == -1) {
fprintf(FCGI_stderr, "receive stream error\n");
free(stream);
stream = NULL;
break;
}
remlen -= (OPJ_SIZE_T)redlen;
ptr = ptr + redlen;
}
return stream;
}The interesting part is what happens when redlen is zero.
These two statements execute:
remlen -= (OPJ_SIZE_T)redlen;
ptr = ptr + redlen;remlen -= (OPJ_SIZE_T)redlen;
ptr = ptr + redlen;But subtracting zero does not change remlen, and adding zero does not move the pointer.
The loop condition remains true:
while (remlen > 0)while (remlen > 0)So the function keeps calling recv() even though the peer has already closed the connection.
It has no way to make progress.
How I traced the impact
Consider a simple example.
The server expects 1,000 bytes from a client. The client sends only 100 bytes and then closes its sending side.
The first receive operation obtains the 100 bytes. The remaining expected length becomes 900.
The next call to recv() returns zero because the connection has reached EOF.
The function does not detect this condition. The remaining length stays at 900, the pointer remains unchanged, and the loop continues.
The result is a tight loop that can consume CPU resources.
This is particularly interesting in a network-facing service because an attacker does not need to send a complicated payload. The failure comes from the way the server handles an incomplete TCP stream.
OpenJPIP uses this receive helper in its JPIP stream reception path, and it is also used by the auxiliary transport acknowledgement handling. That makes correct EOF handling important beyond one individual call site.
Impact
A remote client can cause an affected server-side connection handler to become stuck in a CPU-consuming loop.
Repeated exploitation may consume processing resources and interfere with legitimate clients.
The security impact is a denial-of-service condition in deployments exposing the affected OpenJPIP service.
Proposed fix
The correction is fairly straightforward: treat both a negative return value and a zero return value as a failed or incomplete read.
void * receive_stream(SOCKET connected_socket, OPJ_SIZE_T length)
{
char *stream, *ptr;
OPJ_SIZE_T remlen;
stream = (char *)malloc(length);
if (stream == NULL) {
return NULL;
}
ptr = stream;
remlen = length;
while (remlen > 0) {
ssize_t redlen = recv(connected_socket, ptr, remlen, 0);
/*
* A return value of zero means the peer closed
* the connection before the requested data arrived.
*
* A negative value indicates a receive error.
*/
if (redlen <= 0) {
fprintf(FCGI_stderr,
"receive stream closed or failed\n");
free(stream);
return NULL;
}
remlen -= (OPJ_SIZE_T)redlen;
ptr += redlen;
}
return stream;
}void * receive_stream(SOCKET connected_socket, OPJ_SIZE_T length)
{
char *stream, *ptr;
OPJ_SIZE_T remlen;
stream = (char *)malloc(length);
if (stream == NULL) {
return NULL;
}
ptr = stream;
remlen = length;
while (remlen > 0) {
ssize_t redlen = recv(connected_socket, ptr, remlen, 0);
/*
* A return value of zero means the peer closed
* the connection before the requested data arrived.
*
* A negative value indicates a receive error.
*/
if (redlen <= 0) {
fprintf(FCGI_stderr,
"receive stream closed or failed\n");
free(stream);
return NULL;
}
remlen -= (OPJ_SIZE_T)redlen;
ptr += redlen;
}
return stream;
}A production implementation should also handle interrupted socket calls appropriately for its target platform.
The important correction, however, is simple: a zero-byte read must terminate the operation instead of allowing the loop to continue forever.
2. Trusting a pointer too much: NULL dereference in recv_ack()
Affected file: src/lib/openjpip/auxtrans_manager.c
Affected function: recv_ack()
Vulnerability type: NULL pointer dereference leading to denial of service.
A different failure in the same networking layer
While examining the auxiliary TCP transport, I came across another issue involving the way the code handles data received from the client.
OpenJPIP uses an acknowledgement mechanism when sending data frames through its auxiliary TCP connection.
After transmitting a frame, the server waits for an acknowledgement from the client. The recv_ack() function receives the expected acknowledgement bytes and compares them against the original frame header.
The problem is not in the comparison itself.
It is in the assumption that the receive operation always succeeds.
Vulnerable code
The relevant logic looks like this:
OPJ_BOOL recv_ack(SOCKET connected_socket, void *data)
{
char *header;
OPJ_BOOL succeed;
header = receive_stream(connected_socket, 8);
if (memcmp(header, data, 8) != 0) {
succeed = OPJ_FALSE;
} else {
succeed = OPJ_TRUE;
}
opj_free(header);
return succeed;
}OPJ_BOOL recv_ack(SOCKET connected_socket, void *data)
{
char *header;
OPJ_BOOL succeed;
header = receive_stream(connected_socket, 8);
if (memcmp(header, data, 8) != 0) {
succeed = OPJ_FALSE;
} else {
succeed = OPJ_TRUE;
}
opj_free(header);
return succeed;
}The dangerous operation is:
memcmp(header, data, 8)memcmp(header, data, 8)There is no validation between receiving header and using it.
But remember the function from the first finding: receive_stream() can return NULL when a socket receive operation fails.
That means recv_ack() can receive a NULL pointer and immediately pass it to memcmp().
This is an unsafe memory access.
How can a remote client trigger it?
The relevant execution path occurs when the server is waiting for an acknowledgement on the auxiliary TCP connection.
A client can establish the relevant connection, pass the channel identification step, and then cause a socket receive error while the server is waiting for acknowledgement data.
For example, an abrupt connection reset may cause recv() to return an error.
The receive helper then returns NULL.
recv_ack() does not check the returned pointer and passes it directly to memcmp().
The result is a NULL pointer dereference, which can terminate the server process.
Why this matters
This is a separate issue from the infinite loop discussed earlier.
The first finding occurs when recv() returns zero, indicating that the peer has closed its sending side.
This finding occurs when the receive operation fails and returns an error.
Both conditions are possible in network communication, and both need to be handled safely.
The difference is that one causes the server to keep looping, while the other causes it to use an invalid pointer.
Impact
A remote client may be able to crash an affected OpenJPIP server by triggering the failed acknowledgement receive path.
This is a denial-of-service condition.
Proposed fix
At the very least, the function must check whether the receive helper returned a valid pointer.
I would also recommend making the result distinguish between a successful acknowledgement, an acknowledgement mismatch, and a receive failure.
For that, we can define a small status enum:
typedef enum {
ACK_IO_ERROR = -1,
ACK_MISMATCH = 0,
ACK_MATCH = 1
} ack_status_t;typedef enum {
ACK_IO_ERROR = -1,
ACK_MISMATCH = 0,
ACK_MATCH = 1
} ack_status_t;The corrected function could look like this:
ack_status_t recv_ack(SOCKET connected_socket, void *data)
{
char *header;
ack_status_t result;
header = (char *)receive_stream(connected_socket, 8);
/* Never pass a NULL pointer to memcmp(). */
if (header == NULL) {
return ACK_IO_ERROR;
}
if (memcmp(header, data, 8) == 0) {
result = ACK_MATCH;
} else {
result = ACK_MISMATCH;
}
opj_free(header);
return result;
}ack_status_t recv_ack(SOCKET connected_socket, void *data)
{
char *header;
ack_status_t result;
header = (char *)receive_stream(connected_socket, 8);
/* Never pass a NULL pointer to memcmp(). */
if (header == NULL) {
return ACK_IO_ERROR;
}
if (memcmp(header, data, 8) == 0) {
result = ACK_MATCH;
} else {
result = ACK_MISMATCH;
}
opj_free(header);
return result;
}The caller should then handle the three outcomes separately:
for (;;) {
send_stream(connected_socket, chunk, chunklen);
ack_status_t status = recv_ack(connected_socket, chunk);
if (status == ACK_MATCH) {
break;
}
if (status == ACK_IO_ERROR) {
/*
* The acknowledgement could not be received.
* Close this connection and leave the send loop.
* Do not retry indefinitely on a failed socket.
*/
goto client_connection_failed;
}
/* ACK_MISMATCH: retransmission may be attempted. */
}for (;;) {
send_stream(connected_socket, chunk, chunklen);
ack_status_t status = recv_ack(connected_socket, chunk);
if (status == ACK_MATCH) {
break;
}
if (status == ACK_IO_ERROR) {
/*
* The acknowledgement could not be received.
* Close this connection and leave the send loop.
* Do not retry indefinitely on a failed socket.
*/
goto client_connection_failed;
}
/* ACK_MISMATCH: retransmission may be attempted. */
}The client_connection_failed path should close the connection and follow the existing resource-cleanup logic.
I prefer this approach because simply converting a NULL result into OPJ_FALSE could make the caller treat a failed socket as an ordinary incorrect acknowledgement. A socket failure should terminate the connection rather than trigger an endless retry.
3. When the last packet goes too far: Heap out-of-bounds read in aux_streaming()
Affected file: src/lib/openjpip/auxtrans_manager.c
Affected function: aux_streaming()
Vulnerability type: Heap out-of-bounds read, with potential unintended memory disclosure or denial of service.
The most interesting finding of this audit
Of the three issues, this one stood out to me because it is a good example of how a small arithmetic mistake can become a memory-safety vulnerability.
The aux_streaming() function divides a JPIP response into smaller frames before transmitting them through the auxiliary TCP connection.
The function needs to account for two things:
- The data being transmitted.
- The header attached to every frame.
The header is 8 bytes long:
const OPJ_SIZE_T headlen = 8;const OPJ_SIZE_T headlen = 8;The server normally calls the auxiliary transport with a maximum frame size of 1,000 bytes.
The maximum amount of response data that can fit into a frame is therefore:
1000 - 8 = 992 bytes1000 - 8 = 992 bytesThat means each frame can carry at most 992 bytes of actual response data.
So far, everything makes sense.
The problem appears when the total response length is not an exact multiple of 992.
The vulnerable logic
Here is the relevant part of the function:
const OPJ_SIZE_T headlen = 8;
chunk = (unsigned char *)opj_malloc(
auxresponse->maxlenPerFrame
);
maxLenOfBody = auxresponse->maxlenPerFrame - headlen;
remlen = auxresponse->datalen;
while (0 < remlen) {
memset(chunk, 0, auxresponse->maxlenPerFrame);
chunklen = remlen < maxLenOfBody
? remlen
: maxLenOfBody;
chunklen += headlen;
chunk[0] = (chunklen >> 8) & 0xff;
chunk[1] = chunklen & 0xff;
memcpy(chunk + headlen, ptr, chunklen - headlen);
do {
send_stream(connected_socket, chunk, chunklen);
} while (!recv_ack(connected_socket, chunk));
remlen -= maxLenOfBody;
ptr += maxLenOfBody;
}const OPJ_SIZE_T headlen = 8;
chunk = (unsigned char *)opj_malloc(
auxresponse->maxlenPerFrame
);
maxLenOfBody = auxresponse->maxlenPerFrame - headlen;
remlen = auxresponse->datalen;
while (0 < remlen) {
memset(chunk, 0, auxresponse->maxlenPerFrame);
chunklen = remlen < maxLenOfBody
? remlen
: maxLenOfBody;
chunklen += headlen;
chunk[0] = (chunklen >> 8) & 0xff;
chunk[1] = chunklen & 0xff;
memcpy(chunk + headlen, ptr, chunklen - headlen);
do {
send_stream(connected_socket, chunk, chunklen);
} while (!recv_ack(connected_socket, chunk));
remlen -= maxLenOfBody;
ptr += maxLenOfBody;
}The function correctly calculates the actual size of the current chunk:
chunklen = remlen < maxLenOfBody
? remlen
: maxLenOfBody;chunklen = remlen < maxLenOfBody
? remlen
: maxLenOfBody;However, after sending the chunk, it updates the remaining length and pointer using maxLenOfBody regardless of how many bytes were actually processed.
These two lines are responsible:
remlen -= maxLenOfBody;
ptr += maxLenOfBody;remlen -= maxLenOfBody;
ptr += maxLenOfBody;The maximum possible body size is not necessarily the number of bytes in the current frame.
That distinction becomes critical for the final frame.
Breaking it down with an example
Let's assume the server needs to transmit 1,000 bytes.
Each frame can carry a maximum of 992 bytes.
First iteration
The server sends 992 bytes.
Original data: 1000 bytes
Sent: 992 bytes
Remaining: 8 bytesOriginal data: 1000 bytes
Sent: 992 bytes
Remaining: 8 bytesThe pointer advances by 992 bytes. This is correct.
Second iteration
Only 8 bytes remain.
The function correctly calculates that the next frame should contain those 8 bytes.
It copies the final 8 bytes and sends the frame.
But then it executes:
remlen -= maxLenOfBody;
ptr += maxLenOfBody;remlen -= maxLenOfBody;
ptr += maxLenOfBody;This means it subtracts 992 from a remaining length of 8.
There is another important detail here: OPJ_SIZE_T is an unsigned size type.
Unsigned integer subtraction does not become negative in the way a signed integer would. Instead, it wraps around to a very large value.
The loop condition is still true:
while (0 < remlen)while (0 < remlen)The function enters another iteration even though the original response has already been completely processed.
At this point, the source pointer has also advanced beyond the valid response buffer.
The next copy attempts to read data from outside the allocated buffer:
memcpy(chunk + headlen, ptr, chunklen - headlen);memcpy(chunk + headlen, ptr, chunklen - headlen);That is the heap out-of-bounds read.
Impact
This is more than just a loop that runs for too long.
The function copies data beyond the original response buffer into a frame and passes that frame to send_stream().
Depending on the runtime memory layout, this could:
- Expose adjacent heap contents through the auxiliary TCP connection.
- Cause an invalid memory access or server crash.
- Place unintended memory contents in the transmitted response.
The exact confidentiality impact depends on the runtime memory layout and would need a runtime reproduction to establish.
To be precise, this is a read vulnerability. I am not claiming arbitrary memory write or code execution.
Proposed fix
The correct approach is to calculate the actual body length for every frame and use that same value consistently.
Instead of advancing by the maximum possible frame-body size, we should advance by the number of bytes actually processed.
OPJ_SIZE_T bodylen;
/* Calculate the actual number of data bytes in this frame. */
bodylen = remlen < maxLenOfBody
? remlen
: maxLenOfBody;
/* Frame length includes the 8-byte header. */
chunklen = bodylen + headlen;
chunk[0] = (chunklen >> 8) & 0xff;
chunk[1] = chunklen & 0xff;
/* Copy only the bytes belonging to this frame. */
memcpy(chunk + headlen, ptr, bodylen);
do {
send_stream(connected_socket, chunk, chunklen);
} while (!recv_ack(connected_socket, chunk));
/*
* Advance by the number of bytes actually processed,
* not by the maximum possible frame-body length.
*/
remlen -= bodylen;
ptr += bodylen;OPJ_SIZE_T bodylen;
/* Calculate the actual number of data bytes in this frame. */
bodylen = remlen < maxLenOfBody
? remlen
: maxLenOfBody;
/* Frame length includes the 8-byte header. */
chunklen = bodylen + headlen;
chunk[0] = (chunklen >> 8) & 0xff;
chunk[1] = chunklen & 0xff;
/* Copy only the bytes belonging to this frame. */
memcpy(chunk + headlen, ptr, bodylen);
do {
send_stream(connected_socket, chunk, chunklen);
} while (!recv_ack(connected_socket, chunk));
/*
* Advance by the number of bytes actually processed,
* not by the maximum possible frame-body length.
*/
remlen -= bodylen;
ptr += bodylen;Now our earlier example behaves correctly:
Original data: 1000 bytes
Frame 1:
Body length: 992 bytes
Remaining: 8 bytes
Frame 2:
Body length: 8 bytes
Remaining: 0 bytes
Transmission complete.Original data: 1000 bytes
Frame 1:
Body length: 992 bytes
Remaining: 8 bytes
Frame 2:
Body length: 8 bytes
Remaining: 0 bytes
Transmission complete.There is no unsigned underflow, and the function does not attempt to access memory beyond the response buffer.
A complete production patch should also validate that maxlenPerFrame is greater than the header length before calculating maxLenOfBody.
Putting the three findings together
Looking at these issues side by side, a pattern becomes clear.
All three are related to assumptions about data and memory:
#FunctionRoot causePotential impact1receive_stream()Missing handling of recv() == 0CPU-consuming infinite loop and denial of service2recv_ack()Missing NULL check before memcmp()NULL pointer dereference and denial of service3aux_streaming()Incorrect subtraction and pointer advancement for the final partial frameHeap out-of-bounds read, potential memory disclosure or crash
The first two findings involve different failure conditions in the socket receive path.
The third is independent of those issues. It is a length-accounting problem in the auxiliary frame-transmission loop.
What makes these findings interesting is that they are not dependent on some unusual feature of the JPEG 2000 format. They come from fundamental C programming concerns: return-value handling, pointer validation, and unsigned arithmetic.
These are exactly the kinds of details I try to pay attention to when auditing C projects.
Responsible Disclosure and Current Status
Once I had documented the findings and their affected code paths, I submitted them to VulnCheck through its coordinated vulnerability disclosure process.
The responses were encouraging: VulnCheck confirmed that the reports identify CVE-eligible issues or valid security primitives eligible for CVE assignment.
However, there was an additional challenge.
The OpenJPEG repository has been marked as unmaintained by its maintainers since July 2026. VulnCheck also noted that the OpenJPIP code had not received a commit in over a year and that it could not identify a clear confidential security reporting channel.
For the first submission, VulnCheck declined to facilitate the usual coordinated disclosure process because of the project's maintenance status. It nevertheless indicated that it could proceed toward CVE publication once a public reference was available.
For the other two submissions, VulnCheck also requested public references identifying the affected supplier, product, vulnerability type, and code paths.
That is one reason I decided to document all three findings together here.
At the time of writing, these are CVE-eligible findings. CVE identifiers have not yet been assigned, and this article should not be interpreted as confirmation that CVE publication is complete.
Methodology and Validation Notes
I want to be transparent about how these findings were investigated.
The audit was performed through source-code review of the OpenJPIP implementation at the pinned revision listed in this article.
My investigation involved tracing the relevant functions and their callers, examining how socket reads are handled, and following the response-buffer calculations in the auxiliary transport code.
The validation scope is important:
- The findings were reviewed against the pinned OpenJPEG source revision.
- VulnCheck reviewed the reports and confirmed their CVE eligibility or the eligibility of the reported security primitives.
- I did not execute runtime proof-of-concept tests against a production OpenJPIP deployment.
- I did not perform an AddressSanitizer reproduction for these three findings.
- The fixed snippets in this article are proposed remediations. They have not been represented as upstream patches or as fixes tested and merged by the OpenJPEG maintainers.
I believe being precise about this matters. Source-level analysis, independent triage, and runtime reproduction are different stages of vulnerability research. One should not be presented as proof of another.
A few things this audit reminded me of
As a cybersecurity student, I spend a lot of time learning tools, techniques, protocols, and vulnerability classes. But audits like this are a reminder that understanding the actual code is just as important.
A vulnerability does not always announce itself with an obvious dangerous function or a complicated exploit chain.
Sometimes it is a missing condition in a loop.
Sometimes it is a function returning NULL and another function assuming that could never happen.
And sometimes it is a single subtraction involving an unsigned integer that turns a valid buffer operation into an out-of-bounds read.
I also find it interesting how important it is to follow the execution path instead of judging a suspicious line in isolation. Finding an unsafe operation is only the beginning. Understanding who can reach it, what assumptions are made along the way, and what happens when those assumptions fail is what makes the analysis meaningful.
With 30+ CVE credits to my name, I still consider every new audit an opportunity to learn something. This one reinforced how much can be discovered by patiently following data through a codebase and questioning the smallest assumptions.
I hope documenting these findings helps other researchers understand the issues and gives developers a few useful reminders about safe socket handling and memory management in C.
— Harsh Raj Singhania
Technical References
All source links below point to the reviewed code or relevant project information.
- OpenJPEG repository — reviewed source revision
[sock_manager.c](https://github.com/uclouvain/openjpeg/blob/8314119b067c0fc77834731168daaebd379fdb12/src/lib/openjpip/sock_manager.c)– socket receive implementation[imgsock_manager.c](https://github.com/uclouvain/openjpeg/blob/8314119b067c0fc77834731168daaebd379fdb12/src/lib/openjpip/imgsock_manager.c)– JPIP stream reception[imgsock_manager.h](https://github.com/uclouvain/openjpeg/blob/8314119b067c0fc77834731168daaebd379fdb12/src/lib/openjpip/imgsock_manager.h)– OpenJPIP socket protocol[auxtrans_manager.c](https://github.com/uclouvain/openjpeg/blob/8314119b067c0fc77834731168daaebd379fdb12/src/lib/openjpip/auxtrans_manager.c)– auxiliary TCP transport and frame handling[openjpip.c](https://github.com/uclouvain/openjpeg/blob/8314119b067c0fc77834731168daaebd379fdb12/src/lib/openjpip/openjpip.c)– JPIP response generation and auxiliary transport call path- OpenJPEG repository maintenance notice
Research and disclosure by Harsh Raj Singhania.